#include <stdio.h>
#include "wt.h"

/**
 * start by 
 *          ./tpgui -qws -display Transformed:Rot270
 */

int main(int argc, char *argv[])
{
	system("cp tp_splash.16 /dev/fb0");
	
	QApplication app(argc, argv);

	int maxurb = 0; // whole program will terminates after receiving 'maxurb' urbs. '0' == infinity
	if(argc==2)
		sscanf(argv[1], "%d", &maxurb);
	printf("maxurb = %d.\n", maxurb);
	
	WT *w = new WT;
	w->show();
	/* hide mouse cursor for all widget. do not use w.setCursor( QCursor( Qt::BlankCursor ) ); */
	app.setOverrideCursor( QCursor( Qt::BlankCursor ) );

	ReadURB *r = new ReadURB(w, maxurb);
	r->start();
	
	int retValue = app.exec();
	r->wait();
	return retValue;
}
